package cn.baiweigang.uu.enums;

/**
 * 品种代码
 */
public enum SymbolEnum {
    BTC("BTC", "比特币"),
    USDT("USDT", "稳定币usdt"),
    ;

    private String code;
    private String desc;

    SymbolEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static SymbolEnum byCode(String code) {
        SymbolEnum[] contractTypeEnums = SymbolEnum.values();
        for (int i = 0; i < contractTypeEnums.length; i++) {
            if (contractTypeEnums[i].getCode().equalsIgnoreCase(code)) {
                return contractTypeEnums[i];
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
